﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Icinetic.FeedCategorySample.Entities;

namespace Icinetic.FeedCategorySample.Services.Repositories
{
    public interface IRepository<T>
    {
        int Add(RssItem item);
        void Add(List<RssItem> item);
        void Change(RssItem item);
        void Remove(RssItem item);
        T Find(int oid);
        IList<T> FindAll(int count = 0, int index = 0);
        IList<T> Search(Expression<Func<T, bool>> searchCriteria, Expression<Func<T, object>> orderBy, bool ascending = true, int pageIndex = 0, int pageSize = 10);
        int SearchCount(Expression<Func<T, bool>> searchCriteria);
    }
}
